package gdepot

class Users {

    String fullName
    String userName
    String gender
    String password
    String email
    String phone
    String address

    static constraints = {
        userName(size:2..10,unique: true, blank: false)
        password(size:6..30,blank: false)
        email(email:true,unique: true,blank: false)
        phone(matches: /\d{7,11}/,unique: true, blank: false)
        address(maxSize: 200,blank: false)
        fullName(nullable: true,blank: true)
        gender(nullable: true,blank: true)
    }

    String toString(){
        userName
    }
}
